﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
    xmlns:converters="clr-namespace:Spenta.StreetCare.Silverlight.Converters">
    <Style x:Key="PushpinStyle" TargetType="m:Pushpin">
        <Setter Property="BorderBrush" Value="#FFF4F4F5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Canvas Cursor="Hand" Height="0" RenderTransformOrigin="0.5,0.5" Width="0">
                        <Canvas RenderTransformOrigin="0.5,0.5" Height="1" Width="1">
                            <Canvas.RenderTransform>
                               <CompositeTransform ScaleX="0.5" ScaleY="0.5"/>
                            </Canvas.RenderTransform>
                            <Path Data="M22.5,1 C34.374123,1 44,10.625878 44,22.5 C44,31.034525 39.027256,38.407604 31.821138,41.879868 L31.359026,42.095631 L22.702744,60.864998 L13.900847,42.209641 L13.651964,42.100761 C6.1912994,38.727623 0.99999976,31.220058 1,22.5 C0.99999976,10.625878 10.625878,1 22.5,1 z" Fill="{TemplateBinding BorderBrush}" Height="61.865" Stretch="Fill" Stroke="Black" StrokeThickness="2" StrokeLineJoin="Miter" UseLayoutRounding="False" Width="45" RenderTransformOrigin="0.5,0.5" Canvas.Left="-2.703" Canvas.Top="-7.187" >
                                <Path.RenderTransform>
                                    <CompositeTransform TranslateX="-20" TranslateY="-55"/>
                                </Path.RenderTransform>
                            </Path>
                            <Path Data="M35,17.5 C35,27.164984 27.164984,35 17.5,35 C7.8350167,35 0,27.164984 0,17.5 C0,7.8350167 7.8350167,0 17.5,0 C27.164984,0 35,7.8350167 35,17.5 z" Fill="{TemplateBinding Background}" HorizontalAlignment="Left" Height="35" Stretch="Fill" StrokeThickness="2" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Width="35" UseLayoutRounding="False" Canvas.Top="-7.4" Canvas.Left="-2.888" >
                                <Path.RenderTransform>
                                    <CompositeTransform TranslateX="-15" TranslateY="-50"/>
                                </Path.RenderTransform>
                            </Path>
                        </Canvas>
                        <ContentPresenter Width="15" Height="15" RenderTransformOrigin="0.5,0.5" Canvas.Top="-3.5">
                            <ContentPresenter.RenderTransform>
                                <CompositeTransform TranslateX="-7.5" TranslateY="-23.5"/>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="OldPushpinStyle" TargetType="m:Pushpin">
        <Setter Property="BorderBrush" Value="#FFF4F4F5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Canvas x:Name="Document" Width="29.0737" Height="41.4434" Clip="F1 M 0,0L 29.0737,0L 29.0737,41.4434L 0,41.4434L 0,0" UseLayoutRounding="False" Margin="-14.153,-39.412,-13.922,-1.032">
                        <Grid Height="41.443" Width="29.074">
                            <Canvas x:Name="Group" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Canvas x:Name="pushpin" Width="29.0737" Height="41.4434" Canvas.Left="0" Canvas.Top="0">
                                    <Ellipse x:Name="Ellipse" Width="29.0737" Height="3.8606" Canvas.Left="0" Canvas.Top="37.5828" Stretch="Fill">
                                        <Ellipse.Fill>
                                            <RadialGradientBrush RadiusX="0.491804" RadiusY="3.70372" Center="0.516393,0.685196" GradientOrigin="0.516393,0.685196">
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup/>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#4E000000" Offset="0.00921659"/>
                                                <GradientStop Color="#27000000" Offset="0.345428"/>
                                                <GradientStop Color="#00000000" Offset="0.986046"/>
                                            </RadialGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Path x:Name="Path" Width="15.434" Height="2.049" Canvas.Left="6.792" Canvas.Top="38.375" Stretch="Fill" Data="F1 M 14.5089,38.2079C 18.7709,38.2079 22.226,38.6667 22.226,39.2327C 22.226,39.7986 18.7709,40.2574 14.5089,40.2574C 10.2468,40.2574 6.79172,39.7986 6.79172,39.2327C 6.79172,38.6667 10.2468,38.2079 14.5089,38.2079 Z ">
                                        <Path.Fill>
                                            <RadialGradientBrush RadiusX="0.494094" RadiusY="3.72098" Center="0.501809,0.593037" GradientOrigin="0.501809,0.593037">
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup/>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#B3000000" Offset="0.0139535"/>
                                                <GradientStop Color="#5A000000" Offset="0.351736"/>
                                                <GradientStop Color="#00000000" Offset="0.995349"/>
                                            </RadialGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <Path x:Name="Path_1" Width="27.3332" Height="39.6664" Canvas.Left="0.908844" Canvas.Top="0" Stretch="Fill" Data="F1 M 3.31531,0.5L 25.8356,0.5C 26.8885,0.5 27.742,1.35355 27.742,2.40649L 27.742,25.4034C 27.742,26.4562 26.8885,27.3098 25.8356,27.3098L 20.7717,27.3098L 14.7545,39.1664L 9.03516,27.3098L 3.31531,27.3098C 2.26242,27.3098 1.40884,26.4562 1.40884,25.4034L 1.40884,2.40649C 1.40884,1.35355 2.26242,0.5 3.31531,0.5 Z " StrokeLineJoin="Round" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path x:Name="Path_2" Width="25.4996" Height="2.76852" Canvas.Left="1.88217" Canvas.Top="1.09647" Stretch="Fill" Fill="#93FFFFFF" Data="F1 M 3.37161,1.09647L 25.8919,1.09647C 27.0967,1.09644 27.3217,2.58597 27.3217,2.58597L 27.3813,3.8385C 27.5005,3.89807 1.88217,3.83853 1.88217,3.83853L 1.8822,2.58594C 1.8822,1.76334 2.54904,1.09647 3.37161,1.09647 Z " RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path x:Name="Path_1_Copy" Width="27.333" Height="39.666" Canvas.Left="0.909" Canvas.Top="0" Data="F1 M2.8266823,0.95592105 L24.868349,1.0054474 C25.961227,1.0054474 26.347134,1.9748131 26.347134,3.0549736 L26.326683,24.828363 C26.326683,25.908379 26.190777,26.784046 25.097898,26.784046 L19.841728,26.784046 L13.826682,37.995033 L8.4100161,26.828363 L2.4308491,26.784046 C1.3379819,26.784046 1.0143374,25.741867 1.0143374,24.661852 L1.0143374,2.7451859 C1.0143374,1.6650251 1.7338153,0.95592105 2.8266823,0.95592105 z" StrokeLineJoin="Round" RenderTransformOrigin="0.5,0.5">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#8CFFFFFF" Offset="0.004"/>
                                                <GradientStop Color="Transparent" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Canvas>

                            </Canvas>
                        </Grid>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- #Converters -->
    <converters:PushpinTypeBrushConverter x:Key="PushpinTypeBrushConverter" />

    <!-- #Brushes -->
    <SolidColorBrush x:Key="ControlBackgroundBrush" Color="#A52E2E2E" />
    <SolidColorBrush x:Key="DirectionBackgroundBrush" Color="Black" />
    
</ResourceDictionary>
